package norbert.flickr.util {
	import mx.core.IMXMLObject;
	import mx.logging.ILogger;
	import mx.logging.Log;
	
	public class PhotoDate implements IMXMLObject {
		private static var logger: ILogger = Log.getLogger("norbert.flickr.util.PhotoDate");
		
		/* PROPERTIES */
		
		public function set photo(value: XML): void {
			dateTaken = new Date(Date.parse(value.@datetaken.toString().replace(/-/g, "/")));
			dateUpload = new Date(Date.parse(value.@dateupload.toString().replace(/-/g, "/")));
		}
		
		private var _dateTaken: Date = null;
		[Bindable]
		public function get dateTaken(): Date {
			return _dateTaken;
		}
		public function set dateTaken(value: Date): void {
			_dateTaken = value;
		}
		
		private var _dateUpload: Date = null;
		[Bindable]
		public function get dateUpload(): Date {
			return _dateUpload;
		}
		public function set dateUpload(value: Date): void {
			_dateUpload = value;
		}
		
		/* METHODS */
		
		public function initialized(document: Object, id: String): void { }
		
	}
}
